﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<DVSProject.Models.AccessModels>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Visit</h2>
          <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>
    <div class="CSSTableGenerator">
        <table>
            <tr>
                <th>
                    อนุมัติ
                </th>
                <th>
                    ประเมินการบริการ
                </th>
                <th>View</th>
                <th>
                    หมายเลข
                </th>
                <th>
                    LocationSetCode
                </th>
                <th>
                    DateTimeIn
                </th>
                <th>
                    DateTimeOut
                </th>
                <th>
                    WorkType
                </th>
                <th>
                    SerialNo
                </th>
                <th>
                    Status
                </th>
                <th>
                    SignBy
                </th>
            </tr>
            <% foreach (var item in Model)
               { %>
            <tr>
                <td>
                    <%if (item.Status != "Approve")
                      { %>
                    <%= Html.ActionLink("อนุมัติ", "ApproveForList", new { id = item.FSR_NO  /* id=item.PrimaryKey */ })%>
                    <% } %>
                </td>
                <td>
                    <%if (item.IsComplain == false)
                      {%>
                    <%= Html.ActionLink("ประเมินการบริการ", "../Complain/ComplainForm", new { id = item.FSR_NO  /* id=item.PrimaryKey */ })%>
                    <%} %>
                </td>
                <td>  <%= Html.ActionLink("View", "../ReportVisit/ViewReport", new { FSRNOText = item.FSR_NO  /* id=item.PrimaryKey */ }, new { target = "_blank" })%></td>
                <td>
                    <%= Html.Encode(item.FSR_NO) %>
                </td>
                <td>
                    <%= Html.Encode(item.LocationSetCodeFullName)%>
                </td>
                <td>
                    <%= Html.Encode(String.Format("{0:g}", item.DateTimeIn)) %>
                </td>
                <td>
                    <%= Html.Encode(String.Format("{0:g}", item.SignDatetime))%>
                </td>
                <td>
                    <%= Html.Encode(item.WorkType) %>
                </td>
                <td>
                    <%= Html.Encode(item.MachineFullName) %>
                </td>
                <td>
                    <%= Html.Encode(item.Status) %>
                </td>
                <td>
                    <%= Html.Encode(item.SignBy)%>
                </td>
                <%--   <td>
                <%= Html.Encode(String.Format("{0:F}", item.PresentCount)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.PreviousCount)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.TotalCount)) %>
            </td>
            <td>
                <%= Html.Encode(item.Discount) %>
            </td>
            <td>
                <%= Html.Encode(item.ConversionRate) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.TotalNoOfRacks)) %>
            </td>
            <td>
                <%= Html.Encode(item.SignBy) %>
            </td>--%>
            </tr>
            <% } %>
        </table>
    </div>
  
</asp:Content>
